#include <stdio.h>
  
int main()
{
	int n = 0;
	scanf("%d", &n);
	int a = 0;
	int cnt = 0;
	for ( int i = 0; i < n; i++ ) {
		scanf("%d", &a);
		if ( a >= 70 ) {
			cnt ++;
		}
	}
	
    printf("%d %d", cnt, n - cnt);
    return 0;
}
